package com.oa.test;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class test22 {
	public static void main(String[] args) {
		/*try {
			DateFormat f = new SimpleDateFormat("yyyy-MM-dd");//设置格式
			Date d = f.parse("2007-09-11");
			System.out.println(d);
		} catch (Exception ex) {
			System.out.println(ex.getMessage());
		}*/
		String reg = "[`\\[\\]\"]";
		String str1 = "R02-R01";
		String str2 = "R01,[\"R021\",\"R022\"]";
		String str3 = "[\"R011\",\"R012\"],[\"R021\",\"R022\"]";
		String str4 = "[\"R012\"]";
		/*replaceS(str1);*/
		 
		System.out.println(StringFilter(str3));
		System.out.println(str3.replace("[`\\[\\]\"]", ""));
	}
	
	public static void replaceS(String str){
		String[] arr = str.split("-");
		for(String s:arr){
			
		}
	}
	public static String StringFilter(String str){
		String regEx = "[`\\[\\]\"]";
		Pattern p = Pattern.compile(regEx);
		Matcher m = p.matcher(str);
		return m.replaceAll("").trim();
	}
}
